//package com.my.attendance.controller;
//
//import com.my.attendance.service.EmployeeService;
//import com.my.attendance.service.HistoryService;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@WebServlet("/DeleteEmployeeServlet")
//public class DeleteEmployeeServlet extends HttpServlet {
//    private EmployeeService employeeService=new EmployeeService();
//    private HistoryService historyService=new HistoryService();
//    @Override
//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        try {
//            String id = req.getParameter("id");
//            String employee_number = req.getParameter("employee_number");
//            int i = employeeService.deleteEmployee(Integer.parseInt(id));
//            int i1 = historyService.deleteHistory(Integer.parseInt(employee_number));
//            req.getRequestDispatcher("EmployeePageListServlet").forward(req,resp);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    @Override
//    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        doGet(req, resp);
//    }
//}
